<?php
	header("Content-type: text/html;charset=utf8");
	require_once("../db/dbclass.php");
	require_once("../model/userinfo.php");
	require_once("../utils/common.php");
	$myDb=&DbController::getInstance();
	$send_id=$_POST['send_userid'];
	$receive_id=$_POST['receive_userid'];
	$message=$_POST['message_content'];
	$param="INSERT INTO yj_primsg (sender_id,receiver_id,primsg_content,primsg_time) VALUES ('".$send_id."','".$receive_id."','".$message."','".date('y-m-d h:i:s',time())."')";
	$result=$myDb->exec_query($param);
	if($result==TRUE){
		$result='{"result":"success"}';
	}else{
		$result='{"result":"failure"}';
	}
	echo $result;
?>
